<template>
	<view class="kuang">
		<image class="bj" src="/static/组 6.png" mode=""></image>
		<text class="title">订单详情</text>
	</view>
	<view class="jiantou" @click="goBack"></view>
	<!-- 核销码 -->
	<view class="quyi">
		<view class="shangyi">
			<view class="ayi">
				核销码：​​ MC1234-5678-90121
			</view>
			<view class="aer">
				车辆：​​ 奔驰FWE4/豫A98FHJ
			</view>
		</view>
		<view class="shanger">
			<view class="byi">
				服务项目：
			</view>
			<view class="ber">
				<view class="zi">
					车辆清洗
				</view>
				<view class="qian">
					￥100
				</view>
			</view>
			<view class="bsan">
				<view class="zi">
					车辆精洗附加费
				</view>
				<view class="qian">
					￥10
				</view>
			</view>
		</view>
	</view>
	<!-- 订单信息 -->
	<view class="quer">
		<view class="bt">
			订单信息
		</view>
		<view class="bsi">
			<view class="zi">
				原价
			</view>
			<view class="qian">
				￥100
			</view>
		</view>
		<view class="bsi">
			<view class="zi">
				优惠
			</view>
			<view class="qian">
				￥20
			</view>
		</view>
		<view class="bsi">
			<view class="zi">
				实付金额
			</view>
			<view class="qian">
				￥90.00
			</view>
		</view>
		<view class="bsi">
			<view class="zi">
				订单编号
			</view>
			<view class="qian">
				1223233445
			</view>
		</view>
		<view class="bsi">
			<view class="zi">
				预约时间
			</view>
			<view class="qian">
				2023-03-18 19:00:00
			</view>
		</view>
		<view class="bsi">
			<view class="zi">
				支付时间
			</view>
			<view class="qian">
				2023-03-18 19:14:28
			</view>
		</view>
		<view class="bsi">
			<view class="zi">
				核销时间
			</view>
			<view class="qian">
			</view>
		</view>
	</view>
	<!-- 确认核销 -->
	<button class="btn" @click="showModal = true">确认核销</button>
	<!-- 已核销 -->
	<!-- 	<button class="ybtn">已核销</button> -->
	<!-- 确认核销弹框 -->
	<view v-if="showModal" class="modal-mask" @click="showModal = false">
		<view class="modal-content" @click.stop>
			<text class="modal-title">核销此订单</text>
			<view class="tip-text">
				<text>请您仔细核对订单，此操作不可撤销</text>
				<text>请谨慎操作！</text>
			</view>
			<view class="button-group">
				<view class="cancel-btn" @click="showModal = false">取消</view>
				<view class="confirm-btn" @click="handleConfirm">确认</view>
			</view>
		</view>
	</view>
	<!-- 用来展示全部高度 -->
	<view class="aa">
	</view>
</template>

<script setup>
	import {
		ref
	} from 'vue'

	const showModal = ref(false)

	const handleConfirm = () => {
		console.log('确认核销')
		uni.showToast({
			title: '核销成功',
			icon: 'success'
		})
		showModal.value = false
	}

	function goBack() {
		uni.navigateBack({
			delta: 1
		})
	}
</script>

<style scoped>
	.bj {
		position: absolute;
		z-index: 1;
		width: 750rpx;
		height: 430rpx;
	}

	.kuang {
		display: flex;
		justify-content: center;
	}

	.title {
		font-size: 35rpx;
		position: absolute;
		z-index: 2;
		color: white;
		margin-top: 60rpx;
	}

	.jiantou {
		position: absolute;
		z-index: 2;
		width: 30rpx;
		height: 30rpx;
		border: 5rpx solid white;
		border-top: none;
		border-left: none;
		transform: rotate(135deg);
		margin-top: 60rpx;
		margin-left: 30rpx;
	}

	.quyi {
		position: absolute;
		z-index: 2;
		background-color: white;
		width: 710rpx;
		height: 420rpx;
		margin-top: 140rpx;
		margin-left: 20rpx;
		border-radius: 30rpx;
		border-bottom: 2rpx solid #f8f8f8;
	}

	.quer {
		position: absolute;
		z-index: 2;
		background-color: white;
		width: 710rpx;
		height: 550rpx;
		margin-top: 565rpx;
		margin-left: 20rpx;
		border-radius: 30rpx;
	}

	.shangyi {
		height: 180rpx;
		padding: 40rpx;
		box-sizing: border-box;
		border-bottom: 2rpx solid #f8f8f8;
	}

	.ayi {
		font-size: 33rpx;
		font-weight: bold;
	}

	.aer {
		font-size: 30rpx;
		margin-top: 20rpx;

	}

	.shanger {
		margin-left: 40rpx;
	}

	.byi {
		font-size: 33rpx;
		font-weight: bold;
	}

	.ber {
		display: flex;
		justify-content: space-between;

	}

	.bsan {
		display: flex;
		justify-content: space-between;
	}

	.bsi {
		display: flex;
		justify-content: space-between;
		margin-left: 40rpx;
	}

	.zi {
		font-size: 30rpx;
		margin-top: 30rpx;
	}

	.qian {
		font-size: 30rpx;
		margin-right: 40rpx;
		margin-top: 30rpx;
	}

	.bt {
		font-size: 33rpx;
		font-weight: bold;
		margin-left: 40rpx;
	}

	.btn {
		position: absolute;
		z-index: 2;
		margin-top: 1190rpx;
		background-color: #0362e6;
		color: white;
		width: 520rpx;
		height: 70rpx;
		font-size: 33rpx;
		line-height: 70rpx;
		border-radius: 50rpx;
		margin-left: 115rpx;
	}

	.ybtn {
		position: absolute;
		z-index: 2;
		margin-top: 1190rpx;
		background-color: #808080;
		color: white;
		width: 520rpx;
		height: 70rpx;
		font-size: 33rpx;
		line-height: 70rpx;
		border-radius: 50rpx;
		margin-left: 115rpx;
	}

	.aa {
		height: 1300rpx;
	}

	.modal-mask {
		position: fixed;
		top: 0;
		left: 0;
		right: 0;
		bottom: 0;
		background-color: rgba(0, 0, 0, 0.5);
		display: flex;
		justify-content: center;
		align-items: center;
		z-index: 999;
	}

	.modal-content {
		background-color: white;
		width: 560rpx;
		border-radius: 16rpx;
		padding: 40rpx;
		text-align: center;
	}

	.modal-title {
		display: block;
		font-size: 36rpx;
		font-weight: bold;
		color: #333;
		margin-bottom: 30rpx;
	}

	.tip-text {
		margin-bottom: 40rpx;
	}

	.tip-text text {
		display: block;
		font-size: 28rpx;
		color: #666;
		line-height: 1.6;
	}

	.button-group {
		display: flex;
		justify-content: space-between;
		gap: 20rpx;
	}


	.cancel-btn {
		width: 140rpx;
		height: 60rpx;
		line-height: 60rpx;
		border-radius: 30rpx;
		background-color: #f3f3f3;
		color: #4e4f4e;
		border: 1rpx solid white;
		margin-left: 70rpx;
	}

	.confirm-btn {
		width: 140rpx;
		height: 60rpx;
		line-height: 60rpx;
		border-radius: 30rpx;
		background-color: #2277f3;
		color: white;
		border: 1rpx solid white;
		margin-right: 70rpx;
	}
</style>